package com.yanqu.road.server.manager.activity.tongbing.task.impl;

import com.yanqu.road.entity.enums.eTongBingTaskType;
import com.yanqu.road.server.manager.activity.tongbing.activity.CrossTongBingActivity;
import com.yanqu.road.server.manager.activity.tongbing.task.BaseCrossTongBingTask;

public class CrossTongBingMoveTask extends BaseCrossTongBingTask {

    private long userId;
    private int teamId;

    public CrossTongBingMoveTask(CrossTongBingActivity activity, long beginTime, long userId, int teamId) {
        super(activity, beginTime);
        this.userId = userId;
        this.teamId = teamId;
    }

    @Override
    public void runTask() {
        activity.crossTongBingMoveTask(userId, teamId);
    }

    @Override
    public String getId() {
        return generateId(userId, teamId);
    }

    @Override
    public eTongBingTaskType getType() {
        return eTongBingTaskType.Move;
    }

    public static String generateId(long userId, int teamId) {
        return userId + "-" + teamId;
    }
}
